<?php
	
	const PREG_MOBILE = '#^13[\d]{9}$|^14[\d]{9}$|^15[\d]{9}$|^16[\d]{9}$|^17[\d]{9}$|^18[\d]{9}$|^19[\d]{9}$#';
	const STATUS_NORMAL = 1;
	const STATUS_ZERO = 0;

	const date_formater = 'Y/m/d';
	const UPLOAD_PATH = '/uploads/product/';

	/**
	 * sku常量
	 */
	const SKU_LIST = 'sku_list';
    const SKU_ATTR = 'attr_name';
    const SKU_SPEC = 'spec_name';
    const SKU_NAME = 'default';

	const WEEK = ["星期天","星期一","星期二","星期三","星期四","星期五","星期六"];
	const NON_IMAGE = '/assets/images/placehoder.png';
	const SAFECODE = '1111';

	//缓存KEY常量
	const CACHE_PERMISSION_P = 'permission:supervisor';
	const CACHE_PERMISSION_N = 'permission:normal';
	const CACHE_SKU_ATTR = 'sku:attr';
	const CACHE_SKU_SPEC = 'sku:spec';
	/**
	 * 门店状态
	 */
	const SHOP_STATUS_CLOSE 	= 0;	//关闭
	const SHOP_STATUS_NORMAL	= 1;	//正常
	const SHOP_STATUS_CHECKING 	= 2;	//审核中
	const SHOP_STATUS_FAILURE 	= 9;	//审核未通过

	/**
	 * 门店进场流程
	 * 1合作洽谈/2合同已签/3文案完成/4产品制作/9门店上线
	 */	
	const SHOP_PROGRESS_BEGIN 		= 1;
	const SHOP_PROGRESS_CONTRACT	= 2;
	const SHOP_PROGRESS_DOCUMENT 	= 3;
	const SHOP_PROGRESS_PRODUCT 	= 4;
	const SHOP_PROGRESS_ONLINE 		= 9;

	/**
	 * 门店经营类型
	 * 1个体/2自营/3直营/4连锁
	 */	
	const SHOP_TRADE_OWN 		= 1;
	const SHOP_TRADE_SELF		= 2;
	const SHOP_TRADE_DIRECT 	= 3;
	const SHOP_TRADE_CHAIN 		= 4;
	
	/**
	 * 账户类型
	 */
	const ACCOUNT_TYPE_MEMBER 	= 1;
	const ACCOUNT_TYPE_SHOP		= 2;

	/**
	 * 优惠券类型
	 */
	const COUPON_TYPE_1 	= 1;	//满减券
	const COUPON_TYPE_2 	= 2;	//折扣券
	const COUPON_TYPE_3 	= 3;	//抵用券

	/**
	 * 优惠券使用范围
	 */
	const COUPON_SCOPE_1 	= 1;	//通用券
	const COUPON_SCOPE_2 	= 2;	//店铺券
	const COUPON_SCOPE_3	= 3;	//品类券
	const COUPON_SCOPE_4	= 4;	//单品券

	/**
	 * 支付方式常量
	 * 1:现金/2:银行卡/3:会员卡/4:微信/5:支付宝/6:改签单/8:签单/9:挂账
	 */
	const PAYMENT_TYPE_CASH = 1;
	const PAYMENT_TYPE_BANK = 2;
	const PAYMENT_TYPE_MEMBER = 3;
	const PAYMENT_TYPE_WEIXIN = 4;
	const PAYMENT_TYPE_ALIPAY = 5;

	/**
	 * 交易记录类型常量
	 * -1:余额转入/0:退票/1:购票/2:消费/9:充值
	 */
	const RECORD_TYPE_INIT 		= -1;
	const RECORD_TYPE_REFUND 	= 0;
	const RECORD_TYPE_SALES 	= 1;

	

	/*
		1:借/0:贷
	 */
	const FLAG_DEBIT 		= 1;
	const FLAG_CREDIT		= 0;

	const DEFAULT_PASSWORD  = '123456';

?>